package com.itheima.project.vo.file;

import com.itheima.project.constant.file.FileConstant;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @Description：
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class UploadMultipartFile implements Serializable {

    @ApiModelProperty(value = "文件名称")
    public String originalFilename;

    @ApiModelProperty(value = "存储文件的名称，包含文件存储路径地址：a/b/c/filename")
    public String storeFilename;

    @ApiModelProperty(value = "文件数组")
    public byte[] fileByte;

    @Builder.Default
    @ApiModelProperty(value = "存储标识（不同的存储标识参考FileConstant）,现支持 aliyunoss、qiniu ")
    public String storeFlag = FileConstant.ALIYUN_OSS;

    @ApiModelProperty(value = "存储区域名称")
    public String bucketName;

    @Builder.Default
    @ApiModelProperty(value = "是否自动生成文件存储目录,如果在storeFilename指定了目录，此值设置为false")
    public boolean autoCatalog=true;
}